package com.sundi.ecmarket.web;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sundi.ecmarket.dto.OrderDto;
import com.sundi.ecmarket.dto.ResultEntity;
import com.sundi.ecmarket.service.IEcOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 订单表 前端控制器
 * </p>
 *
 * @author Mht
 * @since 2020-02-23
 */
@RestController
@RequestMapping("/ecOrder")
public class EcOrderController {

    @Autowired
    IEcOrderService iEcOrderService;

    @RequestMapping("/xujiabao/orderlist")
    public ResultEntity list(OrderDto orderDto){

        PageHelper.startPage(orderDto.getPageNo(),orderDto.getPageSize());
        List list = iEcOrderService.selectOrderList(orderDto);
        PageInfo info = new PageInfo(list);
        return ResultEntity.ok();
    }
}
